#pragma once
#ifndef __TOKENISER__INCLUDED__HH__
#define __TOKENISER__INCLUDED__HH__

#include <string>
#include "LitString.h"
#include "LitExceptions.h"

namespace Lit
{
	class LIT_API Tokeniser
	{
	protected:
		std::vector<String> vec;
	public:
		Tokeniser( );
		Tokeniser( const String &str, const String &delim = " " );
		Tokeniser( const Tokeniser& rk );
		~Tokeniser( );

		String join( const String &link = " " ) const;
		Tokeniser& operator=( const Tokeniser& rk );
		Tokeniser& operator+=( const Tokeniser& rk );
		Tokeniser operator+( const Tokeniser& rk ) const;

		String argAt( size_t id );
		String nextArg();
		bool hasMoreArgs() const;
		String rest() const;
		size_t count() const;
		bool empty() const;
	};
};

#endif